home *** CD-ROM | disk | FTP | other *** search
/ Monster Media 1994 #2 / Monster Media No. 2 (Monster Media)(1994).ISO / os2 / chapm11.zip / CHAPMAN.CHA < prev    next >
Text File  |  1994-05-11  |  10KB  |  300 lines

  1. CHAPMAN
  2. Version: 1.1
  3. Name: ChapMan
  4. Time: '11.05.94 13.39.59'
  5.  
  6. SubapplicationNames...: Registration 'General Tools' .
  7. SubapplicationFilenames...: GenTools Register .
  8.  
  9. Textvariables...: Comments Filename 'Init Code' 
  10.    'Finalize Code' 'Class Template' 'Method Template' 
  11.    'Method Comment Template' 'Programmer Id' Copyright .
  12.  
  13. Comments: 
  14. 'ChapMan is a source control system that allows a far better
  15. management and documentation of source code than the
  16. original Smalltalk/V enviroment.'
  17.  
  18. Filename: ChapMan
  19.  
  20. 'Init Code:' ''
  21.  
  22. 'Finalize Code:' ''
  23.  
  24. 'Class Template:' <default>
  25.  
  26. 'Method Template:' <default>
  27.  
  28. 'Method Comment Template:' <default>
  29.  
  30. 'Programmer Id:' <default>
  31.  
  32. Copyright: <default>
  33.  
  34. LibraryBuilderScripts...: Registered Non-Registered .
  35.  
  36. 'LibraryBuilderScript Registered:' 
  37. '| lib app apps unresolved |
  38. "Set some variables and open an object library with feedback window."
  39. app := ChApplication atName: ''ChapMan''.
  40. lib := ObjectLibrary new: ''chapm11r''.
  41. lib feedback: (TextWindow new 
  42.     label: ''Library build for ChapMan''; openOn: '''') pane.
  43. (apps := OrderedCollection with: app) addAll: app allSubApplications.
  44.  
  45. "Set various options."
  46. lib description: ''ChapMan version '', ChApplication programVersion,
  47.     ''for Smalltalk/V''.
  48. lib includeSource: true.
  49.  
  50. "Remap some objects before adding them. E.g. remap
  51. class variables to prevent adding references from them to the library."
  52. (apps inject: Set new into: [:old :app | 
  53.     old addAll: app ownedClasses; yourself]) do: [:class |
  54.         class classPool associationsDo: [:assoc |
  55.             assoc key = ''ChapManDictionary'' ifFalse: [
  56.                 lib remap: assoc to: (Association key: assoc key value: nil)]]].
  57.  
  58. apps do: [:each |
  59.     lib includeSource: each name ~= ''Registration''.
  60.     each ownedClasses do: [:class |
  61.         class = ChApplicationBrowser ifFalse: [
  62.             lib addClass: class]
  63.         ].
  64.     each requiredClasses do: [:class |
  65.         (each methodsForClass: class) do: [:method |
  66.             lib addMethod: (class compiledMethodAt: method)].
  67.         (each methodsForClass: class class) do: [:method |
  68.             lib addMethod: (class class compiledMethodAt: method)]
  69.         ]
  70.     ].
  71.  
  72. lib addClassNoMethods: ChApplicationBrowser.
  73. ChApplicationBrowser methodDictionary do: [:method |
  74.     lib addMethod: method includeSource: true].
  75. ChApplicationBrowser class methodDictionary do: [:method |
  76.     lib addMethod: method includeSource: method selector ~= #registerCheck:data:].
  77.  
  78. lib addMethod: (ChApplicationBrowser class
  79.     compiledMethodAt: #registerCheck:data:)    includeSource: false.
  80.  
  81. "Resolve unresolved objects."
  82. lib addImport: ClassReader.
  83. lib addImport: ClassReader class.
  84. lib addImport: (Smalltalk associationAt: #PMConstants).
  85.  
  86. "Set the initialization method."
  87. lib initMethod: (ChApplication class compiledMethodAt: #initialize).
  88.  
  89. (unresolved := lib collectImports) isEmpty ifFalse: [
  90.     "lib inspect."
  91.     unresolved inspect]
  92. ifTrue: [
  93.     lib writeFile]'
  94.  
  95. 'LibraryBuilderScript Non-Registered:' 
  96. '| lib app apps unresolved |
  97. "Set some variables and open an object library with feedback window."
  98. app := ChApplication atName: ''ChapMan''.
  99. lib := ObjectLibrary new: ''chapm11u''.
  100. lib feedback: (TextWindow new 
  101.     label: ''Library build for ChapMan''; openOn: '''') pane.
  102. (apps := OrderedCollection with: app) addAll: app allSubApplications.
  103.  
  104. "Set various options."
  105. lib description: ''ChapMan version '', ChApplication programVersion,
  106.     ''for Smalltalk/V (Unregistered)''.
  107. lib includeSource: false.
  108.  
  109. "Remap some objects before adding them. E.g. remap
  110. class variables to prevent adding references from them to the library."
  111. (apps inject: Set new into: [:old :app | 
  112.     old addAll: app ownedClasses; yourself]) do: [:class |
  113.         class classPool associationsDo: [:assoc |
  114.             assoc key = ''ChapManDictionary'' ifFalse: [
  115.                 lib remap: assoc to: (Association key: assoc key value: nil)]]].
  116.  
  117. apps do: [:each |
  118.     each ownedClasses do: [:class |
  119.         lib addClass: class].
  120.     each requiredClasses do: [:class |
  121.         (each methodsForClass: class) do: [:method |
  122.             lib addMethod: (class compiledMethodAt: method)].
  123.         (each methodsForClass: class class) do: [:method |
  124.             lib addMethod: (class class compiledMethodAt: method)].
  125.         ]
  126.     ].
  127.  
  128. "Resolve unresolved objects."
  129. lib addImport: ClassReader.
  130. lib addImport: ClassReader class.
  131. lib addImport: (Smalltalk associationAt: #PMConstants).
  132.  
  133. "Set the initialization method."
  134. lib initMethod: (ChApplication class compiledMethodAt: #initialize).
  135.  
  136. (unresolved := lib collectImports) isEmpty ifFalse: [
  137.     "lib inspect."
  138.     unresolved inspect]
  139. ifTrue: [
  140.     lib writeFile]'
  141.  
  142. OwnedClasses...: ChApplication ChSystemApplication 
  143.    ChUserApplication ChChangeItem ChWrapper 
  144.    ChChangeClassReader ChApplicationBrowser ChChangeBrowser 
  145.    ChIPFBrowser ChLibraryBuilder .
  146. RequiredClasses...: Behavior Class SystemDictionary .
  147.  
  148. 'Behavior Methods...:' 
  149.    directSubclasses .
  150.  
  151. 'Behavior class Methods...:' 
  152.    .
  153.  
  154. 'Class Methods...:' 
  155.    changeSuperclassTo: .
  156.  
  157. 'Class class Methods...:' 
  158.    .
  159.  
  160. 'ChApplication ClassComments:' 
  161. 'ChApplication is an abstract class. Instance class are ChSystemApplication
  162. and ChUserApplication.
  163.  
  164. A ChApplication holds all data for an application. An application can own or
  165. require a class. Ownership implies that all instance and class methods belong
  166. to the class. An application which only requires a class holds a selected set
  167. of instance and class methods for that class only.'
  168.  
  169. 'ChSystemApplication ClassComments:' 
  170. 'Description: This class is no real application but serves as a wrapper
  171. for the system classes.
  172.  
  173. Public Methods:        None
  174. Instance Variables:    None
  175. Class Variables:        None
  176. Global Variables:        None
  177. Pool Dictionaries:        None
  178.  
  179. Date        By        Description
  180. 03.05.94    ch        Creation
  181.  
  182. Copyright (c) 1994 Parox GmbH'
  183.  
  184. 'ChUserApplication ClassComments:' 
  185. 'A ChSystemApplication holds data for user applications. 
  186.  
  187.  
  188. Internal variables: 
  189.  
  190. methodDictionary
  191.     a dictionary with keys the names of required or owned classes
  192.     and values arrays of the following form:
  193.     value at: 1        instance methods in application (undefined for an owned class)
  194.     value at: 2        class methods in application (undefined for an owned class)
  195.     value at: 3        true if the application owns the class, 
  196.                     false if the application requires the class
  197.  
  198. libraryBuilderScript
  199.     The ObjectLibraryBuilder script which creates a DLL from the application.
  200.  
  201. Date        By        Description
  202. 06.05.94    ch        Creation
  203.  
  204. Copyright (c) 1994 Parox GmbH'
  205.  
  206. 'ChChangeItem ClassComments:' 
  207. 'Instance variables:
  208. classString - the name of the class of the change as a string
  209.  
  210. selector - the selector of the change as a symbol
  211.  
  212. description - a description of the change item if it does not fit
  213.     in the selector and classString variables. Maybe any data.
  214.     Used with #chapManVariable and #classComment
  215.  
  216. position - the position of the change in the source stream
  217.  
  218. type -  specifies the type of the change:
  219.     #evaluate for an evaluated expression
  220.         classString = selector = description = nil
  221.     #defineClass for a class definition
  222.         classString = class, selector = description = nil
  223.     #method for a method definition
  224.         classString = class, selector = selector, description = nil
  225.     #removeSelector for a selector removal
  226.         classString = class, selector = selector, description = nil
  227.     #removeClass for class removal
  228.         classString = class, selector = description = nil
  229.     #savedImage for a saved image message
  230.         classString = selector = description = nil
  231.     #open for a open window evaluation
  232.         classString = selector = description = nil
  233.     #chapManVariable for a ChapMan variable definitions
  234.         classString = selector = nil,
  235.         description = Array with: application name with: variable name
  236.     #classComment
  237.         classString = class, selector = description = nil'
  238.  
  239. 'SystemDictionary Methods...:' 
  240.    allImplementorsOf: allSendersOf: extendedSendersOf: 
  241.    extendedSendersOf:in: logEvaluate:title: .
  242.  
  243. 'SystemDictionary class Methods...:' 
  244.    .
  245.  
  246. 'ChApplicationBrowser ClassComments:' 
  247. 'Variable:
  248.     textType (String)
  249.         first chararacter uppercase: The application text variable with name textType
  250.         ''nothing''        : nothing has been selected, usually the copyright notice.
  251.         ''classDef''        : class definition
  252.         ''newMethod''    : the new method item has been selected, display the template
  253.         ''methodDef''    : method definition'
  254.  
  255. 'ChChangeBrowser ClassComments:' 
  256. 'The ChangeBrowser reads a Smalltalk source in chunk format and
  257. let you select and browse these changes.
  258.  
  259. Variable description:
  260. changeFile : aStream with the changes to read
  261. changes : an OrderedCollection of the ChangeItems in changeFile
  262. classFilter : name of the class which methods should be displayed or nil
  263. displayedChanges : an OrderedCollection of the displayed ChangeItems
  264. displayMarked : can contain #displayMarked, #displayUnmarked, #displayAll.
  265.     Indicate which type of marked items should be displayed.
  266. displayMenu : the Menu ''Display''
  267. extraTitle : a String which is displayed after ''ChangeBrowser'' in the title window.
  268. markedChange : the Set of marked changes.
  269. selectedChange : the selected ChangeItem'
  270.  
  271. 'ChIPFBrowser ClassComments:' 
  272. 'Description:
  273.  
  274. Public Methods:        None
  275. Instance Variables:    None
  276. Class Variables:        None
  277. Global Variables:        None
  278. Pool Dictionaries:        None
  279.  
  280. Date        By        Description
  281. 07.05.94    ch        Creation
  282.  
  283. Copyright (c) 1994 Parox GmbH'
  284.  
  285. 'ChLibraryBuilder ClassComments:' 
  286. 'Description:
  287.     Implement the code to create object libraries (DLLs) from the
  288.     information supplied in applications.
  289.  
  290. Public Methods:        None
  291. Instance Variables:    None
  292. Class Variables:        None
  293. Global Variables:        None
  294. Pool Dictionaries:        None
  295.  
  296. Date        By        Description
  297. 09.02.94    ch        Creation
  298.  
  299. Copyright (c) 1994 Parox GmbH'
  300.